package com.mspbots.usermanage.controller;


import com.mspbots.api.client.CoreClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
import java.util.concurrent.Callable;

/**
 * @author billb
 */
@RestController
@RequestMapping("user-mapping")
public class TenantUsersMappingController {

    @Autowired
    private CoreClient coreClient;

    @GetMapping(path = "/detail")
    public Callable selectByUserId(@RequestParam Map<String, Object> params) {
        return () -> coreClient.get("/user-mapping/detail", params);
    }

}
